import storage from '/imports/utils/storage'

export default {
  /**
   * 更新用户数据
   * @param {*} state
   * @param {*} userData
   */
  updateUserData (state, userData) {
    if (userData._id) {
      userData.id = userData._id
      storage.setItem('userId', userData.id)
    }
    state.user = userData
  }
}
